package com.javasm.entity.sql;

/**
 * @author WangJie
 * @version 1.0
 * @Description:
 * @date: 2020/7/20 11:03
 * @since JDK 1.8
 */
public interface GameManageSql {
    //分页查询游戏列表
    String SELECT_GAME_BY_PAGE = "SELECT sg.gid,sg.`name`,sg.title,sg.downloadcount,sg.size,sg.gameicon,sg.detailpic,sg.iosurl,sg.androidurl,sg.typename,sg.type,sg.`status`,sg.platform,sg.`desc` FROM system_game sg LIMIT ?,?";

    // 查询游戏信息总记录数
    String SELECT_GAME_TOTALCOUNT = "SELECT COUNT(1) FROM system_game";

    // 通过id查询游戏信息
    String SELECT_GAME_BY_GID = "SELECT sg.gid,sg.`name`,sg.title,sg.downloadcount,sg.size,sg.gameicon,sg.detailpic,sg.iosurl,sg.androidurl,sg.typename,sg.type,sg.`status`,sg.platform,sg.`desc` FROM system_game sg WHERE sg.gid=?";

    // 新增游戏信息
    String INSERT_GAME = "INSERT INTO system_game(`name`,title,downloadcount,size,gameicon,detailpic,iosurl,androidurl,typename,type,`status`,platform,`desc`) VALUES(?,?,?,0,?,?,?,?,?,?,?,?,?)";

    // 通过id删除游戏信息
    String DELETE_GAME_BY_GID = "DELETE FROM system_game WHERE gid = ?";

    // 通过id更新游戏信息
    String UPDATE_GAME_BY_GID = "UPDATE system_game SET `name`=?,title=?,size=?,gameicon=?,detailpic=?,iosurl=?,androidurl=?,typename=?,type=?,`status`=?,platform=?,`desc`=? WHERE gid = ?";

}
